<template>
	<view class="huodonggonggao">
		<cardbox style="width: 100%;" header="民意处理情况总览">
			<view slot="main" class="main1-box">
				<view class="card" v-for="(item,index) in card4ImgList" :key="index">
					<image :src="item.url"></image>
					<view class="title" style="left:40rpx;color: #363636;">
						{{item.title}}
					</view>
					<view class="bottom" :style="`left:40rpx;color: ${item.unitColor};`">
						<text :style="`color: ${item.color};`">
							{{item.number}}
						</text>
						{{item.unit}}
					</view>
				</view>
			</view>
		</cardbox>
		<cardbox style="width: 100%;" header="民意提交统计情况">
			<view slot="main" class="main2-box">
				<BarChar />
			</view>
		</cardbox>
		<cardbox style="width: 100%;" header="民意处理情况详情">
			<view slot="main" class="main3-box">
				<view class="zzdb-log" v-for="(item,index) in logList" :key="index">
					<view class="title">
						{{item.title}}
					</view>
					<view class="log-item" v-for="(v,i) in item.log" :key='i'>
						<view class="time">
							<view class="dot">

							</view>
							{{v.time}}
						</view>
						<view class="item-text">
							{{v.value}}
						</view>
					</view>
				</view>
			</view>
		</cardbox>
	</view>
</template>

<script>
	import cardbox from '@/components/card/cardbox.vue'
	import BarChar from './bar-chart.vue';


	export default {
		components: {
			cardbox,
			BarChar
		},
		data() {
			return {
				card4ImgList: [{
						url: '/static/ct35r2r.png',
						title: '搜集民意数',
						number: 286,
						unit: '',
						color: '#B74B13',
						unitColor: "#DA8254"
					},
					{
						url: '/static/ct35r1r.png',
						title: '已办结民意数',
						number: 16,
						unit: '',
						color: '#21B626',
						unitColor: "#21B626"
					},
					{
						url: '/static/ct35r3r.png',
						title: '平均办理周期',
						number: 7,
						unit: '天',
						color: '#A57504',
						unitColor: "#A57504"
					},

					{
						url: '/static/ct35r4r.png',
						title: '办结率',
						number: 98.61,
						unit: '%',
						color: '#F17666',
						unitColor: " #F17666"
					}
				],
				logList: [{
					title: '202410101011',
					log: [{
						time: '2024-05-27',
						value: '调研联络站数字化建设工作'
					}, {
						time: '2024-05-27',
						value: '调研联络站数字化建设工作'
					}, {
						time: '2024-05-27',
						value: '调研联络站数字化建设工作'
					}, {
						time: '2024-05-27',
						value: '调研联络站数字化建设工作'
					}, ]
				}, {
					title: '202410101011',
					log: [{
						time: '2024-05-27',
						value: '调研联络站数字化建设工作'
					}, {
						time: '2024-05-27',
						value: '调研联络站数字化建设工作'
					}, {
						time: '2024-05-27',
						value: '调研联络站数字化建设工作'
					}, {
						time: '2024-05-27',
						value: '调研联络站数字化建设工作'
					}, ]
				}]
			}
		},
		methods: {
			lookView() {
				uni.navigateTo({
					url: '/pages/lianluozhan/huodong-detail'
				});
			}
		}
	}
</script>

<style scoped lang="scss">
	.huodonggonggao {
		.main1-box {
			padding: 20rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			flex-wrap: wrap;

			.card {
				position: relative;
				width: 49%;
				height: 160rpx;
				margin-bottom: 10rpx;

				image {
					width: 100%;
					height: 100%;
				}
			}

			.title {
				position: absolute;
				top: 26rpx;
				left: 28rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 24rpx;
				color: #7F7F7F;
				line-height: 28rpx;
				text-align: left;
				font-style: normal;
				text-transform: none;
			}

			.bottom {
				position: absolute;
				top: 72rpx;
				left: 28rpx;
				font-family: PingFang SC, PingFang SC;
				font-weight: 500;
				font-size: 24rpx;
				color: #7F7F7F;
				line-height: 28rpx;
				text-align: left;
				font-style: normal;
				text-transform: none;

				text {
					font-family: PingFang SC, PingFang SC;
					font-weight: 500;
					font-size: 40rpx;
					color: #000000;
					line-height: 47rpx;
					text-align: left;
					font-style: normal;
					text-transform: none;
				}
			}


		}

		.main2-box {
			padding: 20px;
		}

		.main3-box {
			padding: 50rpx 20rpx;



			.zzdb-log {
				background: #FFFFFF;
				box-shadow: 0rpx 0rpx 32rpx 0rpx rgba(0, 0, 0, 0.11);
				border-radius: 0rpx 0rpx 0rpx 0rpx;
				border: 2rpx solid #EDEDED;
				position: relative;
				padding: 50rpx 30rpx 0rpx;
				margin-bottom: 50rpx;

				.title {
					position: absolute;
					left: 26rpx;
					top: -25rpx;
					width: 184rpx;
					height: 50rpx;
					line-height: 50rpx;
					background: linear-gradient(135deg, #FF0000 0%, #C70100 100%);
					border-radius: 4rpx 4rpx 4rpx 4rpx;
					font-family: PingFang SC, PingFang SC;
					font-weight: 600;
					font-size: 24rpx;
					color: #FFFFFF;
					text-align: center;
					font-style: normal;
					text-transform: none;
				}

				.log-item {
					margin-bottom: 24rpx;

					.time {
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						font-size: 24rpx;
						color: #F22C1F;
						line-height: 28rpx;
						display: flex;
						align-items: center;

						.dot {
							width: 20rpx;
							height: 20rpx;
							background: #FF1212;
							border-radius: 50%;
							margin-right: 10rpx;
						}
					}

					.item-text {
						padding-left: 35rpx;
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						font-size: 24rpx;
						color: #262626;
						line-height: 46rpx;
					}
				}
			}

			.zzdb-log:nth-last-of-type(1) {
				margin-bottom: 0rpx;
			}
		}


	}
</style>